import request from '@/utils/request'

export async function GetPage_SysConfig(params) {
  const res = await request({
    url: '/sysconfig/GetPage_SysConfig',
    method: 'post',
    params
  })
  return res
}

export async function AddEdit(data) {
  const res = await request({
    url: '/sysconfig/AddEdit',
    method: 'post',
    data
  })
  return res
}

export async function Delete_SysConfig(data) {
  const res = await request({
    url: '/sysconfig/Delete_SysConfig',
    method: 'post',
    data
  })
  return res
}

export async function Getsyslogstb(params) {
  const res = await request({
    url: '/sysconfig/Getsyslogstb',
    method: 'post',
    params
  })
  return res
}

// 获取平台
export async function getplatformpage(params) {
  const res = await request({
    url: '/sysconfig/getplatformpage',
    method: 'post',
    params
  })
  return res
}

export async function firstplatform(params) {
  const res = await request({
    url: '/sysconfig/firstplatform',
    method: 'post',
    params
  })
  return res
}
export async function AddEditplatform(data) {
  const res = await request({
    url: '/sysconfig/AddEditplatform',
    method: 'post',
    data
  })
  return res
}
export async function setstatusplatform(params) {
  const res = await request({
    url: '/sysconfig/setstatusplatform',
    method: 'post',
    params
  })
  return res
}

export async function GetEthAddressConfig(params) {
  const res = await request({
    url: '/sysconfig/GetEthAddressConfig',
    method: 'post',
    params
  })
  return res
}

export async function AddEditEthAddressConfig(data) {
  const res = await request({
    url: '/sysconfig/AddEditEthAddressConfig',
    method: 'post',
    data
  })
  return res
}

export async function DeleteEthAddressConfig(data) {
  const res = await request({
    url: '/sysconfig/DeleteEthAddressConfig',
    method: 'post',
    data
  })
  return res
}

// app升级
/** 新增 修改App版本信息 */
export function AppVersionEdit(data) {
  return request({
    url: '/AppVersion/AppVersionEdit',
    method: 'post',
    data
  })
}

/** 删除App版本信息 */
export function AppVersionDel(params) {
  return request({
    url: '/AppVersion/AppVersionDel',
    method: 'post',
    params
  })
}

/** 获取App版本列表 */
export function GetAppVersion(params) {
  return request({
    url: '/AppVersion/GetAppVersion',
    method: 'post',
    params
  })
}

/** 微信支付配置 */
export function WechatGetPage_SysConfig(params) {
  return request({
    url: '/sysconfig/WechatGetPage_SysConfig',
    method: 'post',
    params
  })
}

/** 微信支付配置 */
export function WechatAddEdit(data) {
  return request({
    url: '/sysconfig/WechatAddEdit',
    method: 'post',
    data
  })
}

/** 大区列表 */
export function wadsConfig() {
  return request({
    url: '/sysconfig/wadsConfig',
    method: 'post'
  })
}

/** 地区列表 */
export function wadsConfig_Province(params) {
  return request({
    url: '/sysconfig/wadsConfig_Province',
    method: 'post',
    params
  })
}

/** 地区新增 */
export function wadsConfig_add(data) {
  try {
    return request({
      url: '/sysconfig/wadsConfig_add',
      method: 'post',
      data
    })
  } catch (error) {
    return null
  }
}

/** 地区删除 */
export function wadsConfig_del(data) {
  try {
    return request({
      url: '/sysconfig/wadsConfig_del',
      method: 'post',
      data
    })
  } catch (error) {
    return null
  }
}

/** 地区管理 */
export function sysArea() {
  try {
    return request({
      url: '/sysconfig/sysArea',
      method: 'post'
    })
  } catch (error) {
    return null
  }
}

/** 设置代理人 */
export function setAreaDls(params) {
  try {
    return request({
      url: '/sysconfig/setAreaDls',
      method: 'post',
      params
    })
  } catch (error) {
    return null
  }
}

/** 删除代理人 */
export function setAreaDls_del(params) {
  try {
    return request({
      url: '/sysconfig/setAreaDls_del',
      method: 'post',
      params
    })
  } catch (error) {
    return null
  }
}

/** 地区列表 */
export function sysAreaByParent(params) {
  try {
    return request({
      url: '/sysconfig/sysAreaByParent',
      method: 'post',
      params
    })
  } catch (error) {
    return null
  }
}

/** 省级分区设置 */
export function setProToWards(params) {
  try {
    return request({
      url: '/sysconfig/setProToWards',
      method: 'post',
      params
    })
  } catch (error) {
    return null
  }
}

/** 设置地区分润比例 */
export function setAreaRate(params) {
  try {
    return request({
      url: '/sysconfig/setAreaRate',
      method: 'post',
      params
    })
  } catch (error) {
    return null
  }
}


/** 用户等级管理 */
export function userLevelConfig() {
  try {
    return request({
      url: '/sysconfig/userLevelConfig2',
      method: 'post'
    })
  } catch (error) {
    return null
  }
}

/** 新增编辑用户等级 */
export function setUserLevelConfig(data) {
  try {
    return request({
      url: '/sysconfig/setUserLevelConfig2',
      method: 'post',
      data
    })
  } catch (error) {
    return null
  }
}

/** 会员等级管理 */
export function userLevelConfig2() {
  try {
    return request({
      url: '/sysconfig/userLevelConfig',
      method: 'post'
    })
  } catch (error) {
    return null
  }
}

/** 新增编辑会员等级 */
export function setUserLevelConfig2(data) {
  try {
    return request({
      url: '/sysconfig/setUserLevelConfig',
      method: 'post',
      data
    })
  } catch (error) {
    return null
  }
}
